//
//  TTToastConfig.m
//  PPDL
//
//  Created by 王洋 on 2019/8/19.
//  Copyright © 2019 王洋. All rights reserved.
//

#import "TTToastConfig.h"

@implementation TTToastConfig

- (void)initToast {
    
    FFToast *toast = [[FFToast alloc]initToastWithTitle:self.model.title message:self.model.content iconImage:nil];
    toast.duration = 2.f;
    toast.titleFont = [UIFont systemFontOfSize:16];
    toast.messageFont = [UIFont systemFontOfSize:14];
    toast.toastPosition = FFToastPositionBelowStatusBarWithFillet;
    toast.toastType = FFToastTypeDefault;

    WEAKSELF
    [toast show:^{
        if (weakSelf.actionHandleBlock) {
            weakSelf.actionHandleBlock(self.model.jumpModel);
        }
    }];

    /*
     //显示在屏幕顶部
     FFToastPositionDefault = 0,
     //显示在状态栏下方
     FFToastPositionBelowStatusBar = 1,
     //显示在状态栏下方+圆角+左右边距
     FFToastPositionBelowStatusBarWithFillet = 2,
     //显示在屏幕底部
     FFToastPositionBottom = 3,
     //显示在屏幕底部+圆角
     FFToastPositionBottomWithFillet = 4,
     //显示在屏幕中间
     FFToastPositionCentre = 5,
     //显示在屏幕中间+圆角
     FFToastPositionCentreWithFillet = 6
     */
    
    /*
     //灰色背景、无图标
     FFToastTypeDefault = 1,
     //绿色背景+成功图标
     FFToastTypeSuccess = 2,
     //红色背景+错误图标
     FFToastTypeError = 3,
     //橙色背景+警告图标
     FFToastTypeWarning = 4,
     //灰蓝色背景+信息图标
     FFToastTypeInfo = 5,
     */
}

@end
